Skip to content

[dashboard] Redesign of dashboard #3295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 53 commits into from
Mar 22, 2021
Merged

[dashboard] Redesign of dashboard #3295

merged 53 commits into from
Mar 22, 2021

Conversation

svenefftinge
Copy link
Member

@svenefftinge svenefftinge commented Feb 28, 2021

We are reimplementing and redesigning the Dashboard.

The current one is a bit grown and has some problems wrt maintenance and loading speed. Also we never really leveraged what material-ui provides us but carried the weight with us.

The new implementation shall provide a clean architecture, based on a react-router SPA. We are (DRI @gtsiolis) building out our own minimal design system based on TailwindCSS.

For the first iteration the goal is to simply replace all the existing functionality. We explicitly don't add new features or change remodel existing ones heavily, so that the server API would need to change. We are however redesigning the UI.

Technology & Architectural Patterns

The dashboard is written in TypeScript and React. For styling it uses TailwindCSS which is a bit nicer than inlining CSS as it supports pseudo classes and a is a little more abstract/reusable.

The App.tsx is the entry point for the SPA and it uses React-Router to register all pages.

    <Switch>
        <Route path="/" exact component={Workspaces} />
        <Route path="/profile" exact component={Profile} />
        <Route path="/notifications" exact component={Notifications} />
        <Route path="/subscriptions" exact component={Subscriptions} />
        <Route path="/env-vars" exact component={EnvVars} />
        <Route path="/git-integration" exact component={GitIntegration} />
        <Route path="/feature-preview" exact component={FeaturePreview} />
        <Route path="/default-ide" exact component={DefaultIDE} />
    </Switch>

Pages are loaded lazily using React.lazy so that not everything needs to be loaded up-front but only when needed:

const Notifications = React.lazy(() => import('./account/Notifications'));
const Profile = React.lazy(() => import('./account/Profile'));
const Subscriptions = React.lazy(() => import('./account/Subscriptions'));
const DefaultIDE = React.lazy(() => import('./settings/DefaultIDE'));
const EnvVars = React.lazy(() => import('./settings/EnvVars'));
const FeaturePreview = React.lazy(() => import('./settings/FeaturePreview'));
const GitIntegration = React.lazy(() => import('./settings/GitIntegration'));

Global state is passed through React.Context.

Fixes #3300

@jankeromnes
Copy link
Contributor

jankeromnes commented Mar 12, 2021

Werft failure sounds like a race:

error Couldn't publish package: "https://registry.yarnpkg.com/@gitpod%2fsupervisor-api-grpc: Failed to save packument, a common cause is if you try to publish a new package before the previous package has been fully processed."

Re-trying:

/werft run

👍 started the job as gitpod-build-dashboard-v2.13

@svenefftinge
Copy link
Member Author

svenefftinge commented Mar 15, 2021

/werft run

👍 started the job as gitpod-build-dashboard-v2.15

@svenefftinge
Copy link
Member Author

svenefftinge commented Mar 15, 2021

/werft run

👍 started the job as gitpod-build-dashboard-v2.16

@svenefftinge
Copy link
Member Author

svenefftinge commented Mar 15, 2021

/werft run

👍 started the job as gitpod-build-dashboard-v2.18

@geropl
Copy link
Member

geropl commented Mar 15, 2021

/werft run

👍 started the job as gitpod-build-dashboard-v2.19

🤞

@svenefftinge
Copy link
Member Author

svenefftinge commented Mar 15, 2021

/werft run

👍 started the job as gitpod-build-dashboard-v2.20

@svenefftinge
Copy link
Member Author

svenefftinge commented Mar 17, 2021

/werft run

👍 started the job as gitpod-build-dashboard-v2.27

@csweichel
Copy link
Contributor

csweichel commented Mar 18, 2021

/werft run

👍 started the job as gitpod-build-dashboard-v2.28

@svenefftinge svenefftinge marked this pull request as ready for review March 22, 2021 15:25
@svenefftinge
Copy link
Member Author

svenefftinge commented Mar 22, 2021

/werft run

👍 started the job as gitpod-build-dashboard-v2.40

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, LET'S DO THIS.

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, LET'S DO THIS.

@svenefftinge
Copy link
Member Author

svenefftinge commented Mar 22, 2021

/werft run

👍 started the job as gitpod-build-dashboard-v2.42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dashboard] Initial minimal functional replacement
6 participants